#include <cstdio>
#include <cstring>

int v[4] = {1, 3, 5, 10};

int min[10010] = {0};

int main()
{
	freopen("zz_test\\test1.in", "r", stdin);
	freopen("zz_test\\test1.out", "w", stdout);
	
	int m = 0;
	scanf("%d", &m);
	memset(&min[0], 0x3f, sizeof(min));
	min[0] = 0;
	for ( int i = 1; i <= m; i++ ) 
	{
		for ( int j = 0; j < 4; j++ ) {
			if ( v[j] > i ) {
				continue;
			}
			int x = min[i-v[j]] + 1;
			if ( x < min[i]) {
				min[i] = x;
			}
		}
	}
	printf("%d", min[m]);
	return 0;
}
